/*
 * Copyright (C), 2016, SOFT
 * FileName:  
 * Author:  
 * Date:  
 * History:  
 * <author>    <time>      <version>   <desc> 
 * 修改人姓名            修改时间               版本号                  描述
 */
package com.solution.common.page;


/**
 * 返回表格数据VO
 * @author solin 2016-12-27 上午12:03:40 
 */
public class JSONGrid {
	
	/**
	 * 消息代码
	 */
	private String code;
	
	/**
	 * 消息内容
	 */
	private String msg;
	
	/**
	 * 总数
	 */
	private long total = 0;
	
	/**
	 * 行数据
	 */
	private Object rows;
	
	public JSONGrid(){};
	
	public JSONGrid(String msg){
		this.code = "0";
		this.msg = msg;
	};
	  
	public JSONGrid(Object rows, long total){
		this.rows = rows;
		this.total = total;
		
		if (0 == total){
			this.code ="0";
			this.msg = "失败";
		}else{
			this.code = "1";
			this.msg = "成功";
		}
	};
	 

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Object getRows() {
		return rows;
	}

	public void setRows(Object rows) {
		this.rows = rows;
	}


	public long getTotal() {
		return total;
	}


	public void setTotal(long total) {
		this.total = total;
	}
  
}



